// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  ssr: false,

  app: {
    pageTransition: { name: 'page', mode: 'out-in' },
    head: {
      title: '云游戏',
      charset: 'utf-8',
      viewport: 'width=device-width, initial-scale=1',
    }
  },

  imports: {
    dirs: [
      // 扫描顶层模块
      'composables',
      // 扫描嵌套的模块，并且使用特定的名称和后缀的文件
      'composables/*/index.{ts,js,mjs,mts}',
      // 扫描给定目录内的所有模块
      'composables/**'
    ],
    autoImport: true
  },

  runtimeConfig: {
    // 服务器端可以获取使用
    apiSecret: "123456",
    // 客户端获取使用
    public: {
      apiBase: "/api",
    },
  },

  devtools: { enabled: true },
  css: ["~/assets/css/main.css", "~/assets/css/base.css"],

  postcss: {
    plugins: {
      tailwindcss: {},
      autoprefixer: {},
    },
  },

  modules: ["@pinia/nuxt", "@pinia-plugin-persistedstate/nuxt", "nuxt-icon", '@nuxt/ui', '@nuxt/image'],
  compatibilityDate: '2025-07-01'
});